//
//  WTLiveRoomInfoModel.m
//  WTLiveSDKDemo
//
//  Created by ben on 16/10/7.
//  Copyright © 2016年 ben. All rights reserved.
//

#import "WTLiveRoomInfoModel.h"

@implementation WTLiveRoomAnchorInfoModel
+ (NSDictionary *)replacedKeyFromPropertyName {
    return @{@"anchor_avatar":@"avatar",
             @"anchor_name":@"name",
             @"anchor_level":@"level",
             @"anchor_net_ease":@"net_ease",
             @"anchor_cutecode":@"cutecode",
             @"anchor_income":@"income",
             @"anchor_room_id":@"room_id"};
}

@end

@implementation WTLiveRoomRoomInfoModel

+ (NSDictionary *)replacedKeyFromPropertyName {
    return @{@"room_benefit":@"benefit",
             @"room_image_url":@"image_url",
             @"room_pull_url":@"pull_url"};
}
@end

@implementation WTLiveRoomInfoModel

- (instancetype)initWithRoomInfo:(NSDictionary*)roomInfo{
    
    if(self = [super init]){
        
        self.roomAnchorModel = [WTLiveRoomAnchorInfoModel mj_objectWithKeyValues:roomInfo[@"anchor"]];
        self.roomRoomModel = [WTLiveRoomRoomInfoModel mj_objectWithKeyValues:roomInfo[@"room"]];
        self.is_follow = [roomInfo[@"is_follow"] integerValue];
        self.status_code  = [roomInfo[@"status_code"] integerValue];
        if(self.status_code == 0){
            self.status_code = [roomInfo[@"StatusCode"] integerValue];
        }
        
    }
    return self;
}
@end
